<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>出错啦</title>
<script src="../js/jquery/jquery-3.3.1.slim.js"></script>
<script type="text/javascript">
	function loadFunc() {
		
		console.log("走这里了？");
		var xmlHttp;
		if (window.XMLHttpRequest) {
			xmlHttp = new XMLHttpRequest();
		}else{
			//IE5.IE6
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
		//设置回调
		xmlHttp.onreadystatechange=function(){
			if(xmlHttp.readyState==4 && xmlHttp.status==200){
				document.getElementById("error_msg").innerHTML = xmlHttp.responseText;
			}
			console.log("Rayman","onReadyStateChange().State："+xmlHttp.readyState);
			console.log("Rayman","onReadyStateChange().Status："+xmlHttp.status);
		}
		console.log("函数End");
		//发送请求
		/* xmlHttp.setRequestHeader("Content-type","application/x-www-form-urledncoded");
		xmlHttp.open("POST","/ServletApplication",true);
		xmlHttp.send(); */
	}
</script>
</head>
<body onload="loadFunc()">
	<a id="error_msg">这里是错误信息</a>
</body>
</html>